package com.effective.java.taggedclasses;

/**
 * Class allowing for initializing new circle instances and offering the
 * capabilities in order to calculate their area.
 * 
 * @author andreas.landerer
 * 
 */
public class Circle extends AbstractFigure {

	/**
	 * The radius of a cirlce.
	 */
	private final double radius;

	/**
	 * Constructor used in order to initialize a new circle.
	 * 
	 * @param radius
	 *            radius of the circle
	 */
	public Circle(double radius) {

		this.radius = radius;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public double area() {

		return Math.PI * (this.radius * this.radius);
	}

}
